package mma;

import org.w3c.dom.ls.LSOutput;

import java.lang.invoke.SwitchPoint;
import java.util.Scanner;

public class User {
   int UserName ;
   int psd ;

   public  int serve(){

       Scanner input = new Scanner(System.in);
       System.out.println("请输入您的用户名");
       UserName = input.nextInt();
       System.out.println("请输入您的密码");
       psd = input.nextInt();
      // User login;
       Bank bank = new Bank() ;
       if (UserName==bank.getName()&& psd==bank.getPsd()){
           System.out.println("欢迎进入");
       }else {
           System.out.println("用户名或密码错误");
       }
       System.out.println("请选择您的服务");
       System.out.println("1.存钱\t2.取钱\t3.查询余额");
       int choice =input.nextInt();
       if (choice==1){
           System.out.println("存钱");
       }else if (choice==2){
           System.out.println("取钱");
       }else if (choice==3){
           System.out.println("查询余额 ");
       }else {
           System.out.println("输入有误！");
       }
       return choice;
   }


    public static void main(String[] args) {
        User user = new User();
        user.serve();

    }
}
